<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        //【1】Array.isArray()方法
        var arr = [2, 3, 4, 5];
        console.log(Array.isArray(arr)); //true
        // 对于不支持该方法的浏览器中，我们可以采用下面的polyfill：
        if (!Array.isArray) {
            Array.isArray = function(Obj) {
                return Object.prototype.toString.apply(Obj) === "[object Array]";
            }
        }
    </script>
</body>

</html>